<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    .box {
        display: flex;
        justify-content: space-between;
        width: 1200px;
        margin: 30px auto;
    }

    .container {
        width: 500px;
        height: 620px;
        overflow: hidden;
        margin: 50px auto;
        display: flex;

    }

    .container1 {
        width: 500px;
        height: 620px;
        overflow: hidden;

        display: flex;
    }

    .container ul,
    .container1 ul {
        width: 100px;
        height: 620px;
        list-style: none;
        justify-content: space-between;
        float: left;
    }

    .container1 ul li {
        margin-left: 10px;
    }

    .container ul li,
    .container1 ul li {
        width: 80px;
        height: 117px;
        line-height: 150px;
        text-align: center;
        cursor: pointer;
        margin-top: 5px;
    }

    .container ul li img,
    .container1 ul li img {
        width: 80px;
        height: 115px;
        /* vertical-align: middle; */
        line-height: 150px;
        text-align: center;
        cursor: pointer;
    }

    .container ol,
    .container1 ol {
        width: 400px;
        height: 600px;
        list-style: none;
        overflow: hidden;
    }

    .container ol li,
    .container1 ol li {
        width: 400px;
        height: 620px;
        background-color: rgba(21, 151, 202, 0.479);
        position: absolute;
        display: none;
    }

    .container ol li img,
    .container1 ol li img {
        width: 400px;
        height: 620px;
        vertical-align: middle;
    }

    .container .on,
    .container1 .on {
        display: block;
    }

    .container .active,
    .container1 .active {
        border: 2px solid black;
    }
</style>

<body>
    <div class="container">
        <ul class="">
            <li class='active' date-index='0'><img src="./img/9.9.jfif" alt=""> </li>
            <li date-index='1'><img src="./img/4.png" alt=""> </li>
            <li date-index='2'><img src="./img/1.jpg" alt=""> </li>
            <li date-index='3'><img src="./img/2.jpg" alt=""> </li>
            <li date-index='4'><img src="./img/3.jfif" alt=""> </li>
        </ul>
        <ol>
            <li class="on" date-index='0'><img src="./img/9.9.jfif" alt=""> </li>
            <li date-index='1'><img src="./img/4.png" alt=""> </li>
            <li date-index='2'><img src="./img/1.jpg" alt=""> </li>
            <li date-index='2'><img src="./img/2.jpg" alt=""> </li>
            <li date-index='2'><img src="./img/3.jfif" alt=""> </li>
        </ol>
    </div>
    <script src="../jquery/jquery-3.6.0.min.js"></script>
    <script>
       
            $(' .container ul li').on('click', function(){
                console.log($(this).index())
                $('.container ul li').removeClass('active')
                $('.container ol li').removeClass('on')
                $(this).addClass('active')
                $('.container ol li').eq($(this).index()).addClass('on')
            })
    </script>
</body>

</html>